package jm.coll.set;

/**
 * @Description HashSet结构简单模拟，其实就是HashMap
 * @date 2022/4/2 13:33
 */
public class HashSetStructure {
    public static void main(String[] args) {
        // 存放数据的数组
        Node[] table = new Node[16];

        Node john = new Node("john",
                        new Node("jack",
                                new Node("rose",null)));
        table[2] = john;

        Node lucy = new Node("lucy", null);
        table[3] = lucy;

    }
}

class Node{
    Object item;
    Node next;

    public Node(Object item, Node next){
        this.item = item;
        this.next = next;
    }
}
